1. Field of the invention
The present invention relates to a method and apparatus for displaying characters and/or figures in a computer graphics, especially to a display method and apparatus capable of painting or coloring characters and/or figures in an improved manner.
2. Description of the related art
As a typical one of methods and apparatus for painting or coloring characters and/or figures in a computer graphics, there has been known a method disclosed in the laid-open Japanese patent application JP-A-62/192878 (1987), entitled "a method for painting a polygon".
According to this, an apparatus comprises a display memory having a plurality of drawing dots for bearing display data, which correspond to pixels in a raster-scan type display device, a work memory having the same number of drawing dots as those of the display memory, and a controller for executing the drawing (writing-in of display data) in the respective memories and the reading-out of the drawn data therefrom, and for controlling the display of the read-out data on a display device, in which the painting of polygons, which from characters and/or figures in combination, are carried out in the following manner.
Namely, display data of a polygon to be displayed are drawn in the display memory in a designated texture, and synchronously therewith, data of an outline of the polygon, which is called a painting frame, are drawn in the work memory in accordance with predetermined rules.
If the work memory, in which a painting frame of a polygon to be painted was drawn, is scanned by a horizontal scanning line and points, at which the scanning line crosses with the painting frame, are numbered in order from one end to the other, parts residing between cross points in odd numbers and those in even numbers belong to an inner part of the polygon. Therefore, the polygon can be painted thoroughly by repeating the painting starting from cross points in odd numbers and ending at those in even numbers, while shifting the horizontal scanning line vertically.
According to this method, the efficient painting of polygons, and hence characters and/or figures formed thereby, can be achieved without being subject to any limitation due to the number of vertexes and the sort of boundary lines of the polygons to be painted and without increasing an amount of calculation for painting.
By the way, as understood from the foregoing, it is expected in the prior art that a horizontal scanning line always crosses with a painting frame of a polygon to be painted at the even number of points.
If, however, a vertex or a side are commonly owned by two polygons to be painted, there occurs the case where a horizontal scanning line crosses with painting frames of those polygons at the odd number of points. In such case, a part of the polygons can not be painted. By way of example, if there are three cross points on a horizontal scanning line, the painting can be performed between the first and the second cross points, but a part between the second and the third cross points can not be painted, because the painting is always carried out only between cross points in odd numbers and those in even numbers, not between cross points in even numbers and those in odd numbers.